<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="这里收录了iOS开发中能遇到的各种小问题。">
<meta property="og:type" content="article">
<meta property="og:title" content="iOS小问题汇总">
<meta property="og:url" content="http://yoursite.com/2016/08/28/iOS/iOS小问题汇总/index.html">
<meta property="og:site_name" content="ZhouJiatao's Blog">
<meta property="og:description" content="这里收录了iOS开发中能遇到的各种小问题。">
<meta property="og:image" content="http://7xr5jb.com1.z0.glb.clouddn.com/buildPrecessing.jpg">
<meta property="og:updated_time" content="2017-01-20T09:09:51.482Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="iOS小问题汇总">
<meta name="twitter:description" content="这里收录了iOS开发中能遇到的各种小问题。">
<meta name="twitter:image" content="http://7xr5jb.com1.z0.glb.clouddn.com/buildPrecessing.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2016/08/28/iOS/iOS小问题汇总/"/>





  <title> iOS小问题汇总 | ZhouJiatao's Blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  


<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-91431386-1', 'auto');
  ga('send', 'pageview');
</script>









  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">ZhouJiatao's Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
    
      <p class="site-subtitle"></p>
    
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2016/08/28/iOS/iOS小问题汇总/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="ZhouJiatao">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="http://7xr5jb.com1.z0.glb.clouddn.com/avatar%23privateinvestocat.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="ZhouJiatao's Blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="ZhouJiatao's Blog" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                iOS小问题汇总
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2016-08-28T19:17:47+00:00">
                2016-08-28
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2016/08/28/iOS/iOS小问题汇总/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2016/08/28/iOS/iOS小问题汇总/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>这里收录了iOS开发中能遇到的各种小问题。</p>
<a id="more"></a>
<h1 id="NSArrayI-addObject-unrecognized"><a href="#NSArrayI-addObject-unrecognized" class="headerlink" title="[__NSArrayI addObject] unrecognized"></a>[__NSArrayI addObject] unrecognized</h1><p>当你运行程序时出现以下错误信息：</p>
<pre><code>NSMutableArray addObject: -[__NSArrayI addObject:]: unrecognized selector sent to instance
</code></pre><p>说明你在向一个immutable数组添加对象。<br>如果直接向一个NSArray类型的数组添加对象，编译期间就会报错，并不会等到运行时。所以这种报错通常是源于，你声明了一个NSMutableArray类型的数组，然后用一个immutable数组给它赋值。<br>比如</p>
<pre><code>NSMutableArray *views = [self.subviews copy];
</code></pre><p>你该这样：</p>
<pre><code>NSMutableArray *views = [self.subviews mutableCopy];
</code></pre><h1 id="为什么edit-menu不显示中文"><a href="#为什么edit-menu不显示中文" class="headerlink" title="为什么edit_menu不显示中文"></a>为什么edit_menu不显示中文</h1><p>这是因为项目没有进行国际化，默认语言是英文。<br>解决方法很简单：</p>
<ol>
<li>在Xcode界面左侧的<em>Project Navigator</em>面板选择你的项目；</li>
<li>在<em>Project Editor</em>面板的<strong>PROJECT</strong>下，再次选择你的项目；</li>
<li>视线稍微向右看，点击Info -&gt; 展开Localizations -&gt; 点击”+” -&gt; 选择语言Chinese(Simplified)；<br>app会根据设备的语言环境，自动切换语言。运行在中文环境下，Edit Menu将显示为中文。</li>
</ol>
<h1 id="‘Xcode-process-launch-failed-Security’"><a href="#‘Xcode-process-launch-failed-Security’" class="headerlink" title="‘Xcode process launch failed: Security’"></a>‘Xcode process launch failed: Security’</h1><p>通过Xcode将app运行到iPhone时，Xcode出现一个提示框，内容如下：</p>
<pre><code>Could not launch &quot;your app&quot;
process launch failed: Security
</code></pre><p>app不能在iPhone中运行起来。<br>解决这个问题，你需要在iPhone中进入 <code>Setttings-&gt;General-&gt;DeviceManagement</code>，点击你的app，在弹出框中选择trust。<br>在iOS 9以下，你可以直接在手机桌面点击app，将有一个弹出框跳出，提示是否想要运行这个程序，选择确定然后重新编译运行程序。</p>
<h1 id="Xcode上传Archive时发生“Cannot-verify-client-3000-”错误"><a href="#Xcode上传Archive时发生“Cannot-verify-client-3000-”错误" class="headerlink" title="Xcode上传Archive时发生“Cannot verify client. (3000)”错误"></a>Xcode上传Archive时发生“Cannot verify client. (3000)”错误</h1><p>冷静。<br>请 <strong>重新启动Xcode -&gt; Clean -&gt; Build -&gt; Archive</strong>.<br>OK！<br>提示：如果你添加了新的图片资源，最好能先commit一下你的最近一次更改。因为我使用Xcode 7，发现在提交代码前clean project，最近添加的图片资源会消失。</p>
<h1 id="iTunes-connect找不到新上传的build"><a href="#iTunes-connect找不到新上传的build" class="headerlink" title="iTunes connect找不到新上传的build"></a>iTunes connect找不到新上传的build</h1><p>通过Xcode上传了新版本，但iTunes connect的Build选择框看不到该版本?<br><!-- more --><br>当你通过Xcode上传了版本后，在iTunes connect-&gt;MyApp-&gt;选中你的App-&gt;Activity可以看到你刚才上传的版本。并显示状态为 “Processing”。此时已经证明你成功上传版本到iTunes connect了。</p>
<p><img src="http://7xr5jb.com1.z0.glb.clouddn.com/buildPrecessing.jpg" alt="buildProcessing"></p>
<p>但在“processing”状态下的“Build”，是不能被选用的。你需要等待，当“processing”状态过后，你就可以选用此“Build”。<br>我上传的一个50Mb的app，需要等待半个小时左右。</p>
<h1 id="在-StoryBoard-中移除-Static-TableView-的个别-Cell-的分隔线"><a href="#在-StoryBoard-中移除-Static-TableView-的个别-Cell-的分隔线" class="headerlink" title="在 StoryBoard 中移除 Static TableView 的个别 Cell 的分隔线"></a>在 StoryBoard 中移除 Static TableView 的个别 Cell 的分隔线</h1><p>通过将分隔线的 left inset 设置为超出屏幕宽度的值。<br>在 Storyboard 中选择 Cell， Attributes inspector -&gt; Separator -&gt; Custom Insets:<br>Left 填写 2000。(数字大到足以超出屏幕即可)  </p>
<h1 id="去除-UITableView-多余的分隔线"><a href="#去除-UITableView-多余的分隔线" class="headerlink" title="去除 UITableView 多余的分隔线"></a>去除 UITableView 多余的分隔线</h1><p>当 cell 的数量不足以填满整个屏幕时， tableview 会在底部显示出许多分割线。<br>如何去除多余的分隔线？ 为 tableview 添加 footerView 即可(代码和 UIStoryboard 都可以添加)。</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">tableView.tableFooterView = <span class="type">UIView</span>()</div></pre></td></tr></table></figure>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/04/28/iOS/iOS-强制更新机制/" rel="next" title="iOS App强制更新机制">
                <i class="fa fa-chevron-left"></i> iOS App强制更新机制
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/09/21/Other/搭建Git服务器/" rel="prev" title="搭建Git服务器">
                搭建Git服务器 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2016/08/28/iOS/iOS小问题汇总/"
           data-title="iOS小问题汇总" data-url="http://yoursite.com/2016/08/28/iOS/iOS小问题汇总/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://7xr5jb.com1.z0.glb.clouddn.com/avatar%23privateinvestocat.jpg"
               alt="ZhouJiatao" />
          <p class="site-author-name" itemprop="name">ZhouJiatao</p>
          <p class="site-description motion-element" itemprop="description">Write simple code</p>
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">29</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-categories">
              
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">分类</span>
              
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">18</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/RealMeZJT" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#NSArrayI-addObject-unrecognized"><span class="nav-number">1.</span> <span class="nav-text">[__NSArrayI addObject] unrecognized</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#为什么edit-menu不显示中文"><span class="nav-number">2.</span> <span class="nav-text">为什么edit_menu不显示中文</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#‘Xcode-process-launch-failed-Security’"><span class="nav-number">3.</span> <span class="nav-text">‘Xcode process launch failed: Security’</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Xcode上传Archive时发生“Cannot-verify-client-3000-”错误"><span class="nav-number">4.</span> <span class="nav-text">Xcode上传Archive时发生“Cannot verify client. (3000)”错误</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#iTunes-connect找不到新上传的build"><span class="nav-number">5.</span> <span class="nav-text">iTunes connect找不到新上传的build</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#在-StoryBoard-中移除-Static-TableView-的个别-Cell-的分隔线"><span class="nav-number">6.</span> <span class="nav-text">在 StoryBoard 中移除 Static TableView 的个别 Cell 的分隔线</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#去除-UITableView-多余的分隔线"><span class="nav-number">7.</span> <span class="nav-text">去除 UITableView 多余的分隔线</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">ZhouJiatao</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"realmezjt"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
    
    <script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
    <script src="/js/src/hook-duoshuo.js"></script>
  












  
  

  

  

  

  


</body>
</html>
